package com.imooc.modular.dto;


import com.fasterxml.jackson.annotation.JsonView;
import com.imooc.modular.validator.Insert;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotEmpty;

@Data
@AllArgsConstructor
public class User {

    public interface UserSimpleView{};
    public interface UserDetailView extends UserSimpleView{};

    @JsonView(UserSimpleView.class)
    private String userName;

    @JsonView(UserDetailView.class)
    private String passWord;

    @NotEmpty( groups = {Insert.class},message = "id不能为空")
    private String id;

}
